import { BasicFetchResult } from '/@/api/model/baseModel';

export interface AppItem {
  appName: string;
  appId: string;
}

export interface tenantItem {
  tenantCode: string;
  tenantName: string;
}

export interface ApiItem {
  id: string;
  description: string;
}

export type ApiParams = {
  appIdList: string[];
};

export type ApiPageParams = {
  current: string;
  size: string;
  apiList: string[];
  appList: string[];
  startDate: string;
  endDate: string;
};

export interface ApiPageItem {
  appName: string;
  module: string;
  description: string;
  apiId: string;
  counts: string;
  uri: string;
}

export type ApiPageResult = BasicFetchResult<ApiPageItem[]>;

export type ApiSubListParams = {
  apiId: string;
  startDate: string;
  endDate: string;
};

export type TenantSubListParams = {
  tenantCode: string;
  startDate: string;
  endDate: string;
};

export type TenantListParams = {
  current: string;
  size: string;
  tenantList: string[];
  startDate: string;
  endDate: string;
};

export interface ApiSubListItem {
  apiId: string;
  counts: string;
  recordDate: string;
  tenantCode: string;
  tenantName: string;
}

export interface ApiDetailItem {
  apiId: string;
  counts: string;
  recordDate: string;
  tenantCode: string;
  tenantName: string;
}

export interface TenantDetailItem {
  apiId: string;
  appName: string;
  module: string;
  description: string;
  uri: string;
  counts: string;
  recordDate: string;
  tenantCode: string;
  tenantName: string;
}

export type SubListParams = {
  tenantCode: string;
  apiId: string;
  startDate: string;
  endDate: string;
};

export interface SubDetailItem {
  apiUrl: string;
  tenantName: string;
  dateList: string[];
  countsList: string[];
}
